#pragma once

#include "LampProg.h"


class QOpenGLFunctions_3_3_Core;
class QOpenGLShaderProgram;
class QOpenGLVertexArrayObject;
class Camera;


class CubeLampProg : public LampProg
{
    Q_OBJECT
public:
    explicit CubeLampProg(QObject *parent = nullptr);
    virtual ~CubeLampProg();

    virtual void initializeGL(QOpenGLContext* ctx, void* arg, size_t argLen);
    virtual void paintGL(const Camera& camera, const QMatrix4x4& projection);

signals:

public slots:
    virtual void teardownGL();

private:
    QOpenGLFunctions_3_3_Core*  MY_GL_FUNC;
    GLfloat*                    vertices;
    size_t                      verticesBufLen;

    QOpenGLShaderProgram*       program;
    QOpenGLVertexArrayObject*   vao;

    int                         modelLoc;
    int                         viewLoc;
    int                         projectionLoc;
    int                         colorLoc;
};
